<?php
namespace app\admin\controller;

class Index extends Common
{
    public function index()
    {
        $mysql= db()->query("select VERSION() as version");
        $mysql=$mysql[0]['version'];
        $mysql=empty($mysql)?'未知':$mysql;

        //server infomaions
        $info = array(
            '操作系统' => PHP_OS,
            '运行环境' => $_SERVER["SERVER_SOFTWARE"],
//            'PHP版本' => PHP_VERSION,
            'PHP运行方式' => php_sapi_name(),
            'PHP版本' => phpversion(),
            'MYSQL版本' =>$mysql,
            '程序版本' => THINK_VERSION . "&nbsp;&nbsp;&nbsp; [<a href='http://www.thinkphp.cn/' target='_blank'>ThinkPHP</a>]",
            '上传附件限制' => ini_get('upload_max_filesize'),
            '执行时间限制' => ini_get('max_execution_time') . "s",
            '剩余空间' => round((@disk_free_space(".") / (1024 * 1024)), 2) . 'M',
        );
        $this->assign('server_info', $info);
        return view();
    }
}
